home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / gnustuff / minix / libsrc~1.z / libsrc~1 / time.c < prev    next >
Encoding:
C/C++ Source or Header  |  1989-12-28  |  272 b   |  16 lines

  1. #include "lib.h"
  2.  
  3. #define OK 0
  4.  
  5. PUBLIC long time(tp)
  6. long *tp;
  7. {
  8.   int k;
  9.   long l;
  10.   k = callm1(FS, TIME, 0, 0, 0, NIL_PTR, NIL_PTR, NIL_PTR);
  11.   if (M.m_type < 0 || k != OK) {errno = -M.m_type; return(-1L);}
  12.   l = M.m2_l1;
  13.   if (tp != (long *) 0) *tp = l;
  14.   return(l);
  15. }
  16.